home *** CD-ROM | disk | FTP | other *** search
- # MAINELINK TRUMPET LOGIN.CMD DIALING SCRIPT
- #
- #if ![load $method]
- query $method "Select (S)lip or (P)PP mode."
- # **** convert case
- $method = upper ($method)
- # save $method
- # end
- #end
- if ![load $username]
- if [username "Enter your login username"]
- save $username
- end
- end
- #if ![load $password]
- if [password "Enter your login password"]
- # save $password
- end
- #end
- # *** Prompt for dialing prefix to either dial 9 or disable callwaiting.
- #if ![load $number]
- query $prefix "Enter dialing prefix. (*70 or 9)"
- # save $number
- # end
- #end
- # *** If no number, prompt for it and save it.
- if ![load $number]
- query $number "Enter telephone number"
- save $number
- end
- # *** Make sure saved number has a value
- if $number = ""
- query $number "Enter telephone number"
- save $number
- end
- $modemsetup = "z"
- $prompt = ">"
- $userprompt = "login:"
- $passprompt = "Password:"
- #$addrtarg = "Your address is"
- $addrtarg = "to"
- %attempts = 10
- #
- #----------------------------------------------------------
- #
- # initialize modem
- #
- #----------------------------------------------------------
- output "atz"\13
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
- #----------------------------------------------------------
- #
- # modem setup commands
- #
- #----------------------------------------------------------
- output "at"$modemsetup\13
- input 10 OK\n
- #----------------------------------------------------------
- #
- # *** send phone number including prefix
- #
- #----------------------------------------------------------
- %n = 0
- repeat
- if %n = %attempts
- display "Too many dial attempts"\n
- abort
- end
- output "atdt"$prefix","$number\13
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- input 10 \n
- #----------------------------------------------------------
- #
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- #----------------------------------------------------------
- wait 30 dcd
- #----------------------------------------------------------
- #
- # now prod the terminal server
- #
- #----------------------------------------------------------
- output \13
- #----------------------------------------------------------
- #
- # wait for the username prompt
- # *** Also outputs the method of login!
- #
- #----------------------------------------------------------
- input 30 $userprompt
- output $method$username\13
- #----------------------------------------------------------
- #
- # and the password
- #
- #----------------------------------------------------------
- input 30 $passprompt
- output $password\13
- #----------------------------------------------------------
- #
- # we are now logged in
- #
- #----------------------------------------------------------
- input 30 $addrtarg
- address 30
- display \nConnected. Your IP address is \i.\n